Crate droid_wrap_utils

Source

Macros§

  • 实现rust数组类型与java数组的自动关联
  • 定义必要的trait,以便于在本地为任何数据类型实现JAVA对象所需的功能。
  • 获取vm,将vm附加到当前线程,随后操作java虚拟机。

Structs§

  • A RAII implementation of scoped guard which detaches the current thread when dropped. The attached JNIEnv can be accessed through this guard via its Deref implementation.
  • A global JVM reference. These are “pinned” by the garbage collector and are guaranteed to not get collected until released. Thus, this is allowed to outlive the JNIEnv that it came from and can be used in other threads.
  • Lifetime’d representation of a jclass. Just a JObject wrapped in a new class.
  • FFI-compatible JNIEnv struct. You can safely use this as the JNIEnv argument to exported methods that will be called by java. This is where most of the magic happens. All methods on this object are wrappers around JNI functions, so the documentation on their behavior is still pretty applicable.
  • Wrapper around [sys::jobject] that adds a lifetime to ensure that the underlying JNI pointer won’t be accessible to safe Rust code if the object reference is released.
  • Lifetime’d representation of a jobjectArray which wraps a JObject reference
  • Lifetime’d representation of a jstring. Just a JObject wrapped in a new class.
  • The Java VM, providing Invocation API support.
  • Native method descriptor.

Enums§

Traits§

Functions§

Type Aliases§